<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>子项flex的属性</title>
    <style>
        /* 两边固定 中间自适应  叫圣杯布局 */
        /* section{
            display: flex;
            width: 500px;
            height: 150px;
            margin: 0 auto;
            background-color: blue;
            justify-content: space-between;
        }
        div:nth-child(1){
            width: 100px;
            height: 150px;
            background-color: pink;
        }
        div:nth-child(2){
            /* 这个属性 是分配父盒子剩余的空间 可以占几份 */
            /* flex: 1;
            background-color: aqua;
        }
        div:nth-child(3){
            width: 100px;
            height: 150px;
            background-color:skyblue; 
        } */
        p{
            display: flex;
            width: 500px;
            height: 150px;
            margin: 0 auto;
            background-color: red;
            box-sizing: border-box;
            justify-content: space-around;
        }
        span{
         flex: 1;
          background-color: blue ;
          border: 1px solid pink;
        }
        span:nth-child(2){
            flex: 2;
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <section>
        <div></div>
        <div></div>
        <div></div>
    </section>
    <p>
        <span>1</span>
        <span>2</span>
        <span>3</span>
    </p>
</body>
</html>